package daoMySQL;

import daoDataFactory.DbObject;
import daoInterface.DaoIConsumtie;
import domijn.Categorie;
import domijn.Consumptie;
import domijn.Gerecht;
import domijn.Menu;

import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;


public class MySQLConsumtie extends DbObject implements DaoIConsumtie{
    
	private Statement stmt = null;
	private ResultSet rs = null;
	@SuppressWarnings("unused")
	private Consumptie con;
	@SuppressWarnings("unused")
	private Menu m;
	@SuppressWarnings("unused")
	private Categorie c;
	@SuppressWarnings("unused")
	private Gerecht g;
	
	private static MySQLConsumtie instance;
	
	public static DaoIConsumtie instance(){
		if (instance == null) {
			 instance = new MySQLConsumtie();
		}
		return instance;
	}

	@Override
	public void save(Consumptie consumptie) {	
	}
	
	
    @Override
    public ArrayList<Consumptie> loadall() {
		ArrayList<Consumptie>consumties = new ArrayList<>();
        String sqlloadall = "Select * from mcc";
        try {
            stmt = openConnection().createStatement();
            rs = stmt.executeQuery(sqlloadall);
            while (rs.next()) {                
            }
        } catch (Exception e) {
        }
    return consumties;
    }

	@Override
	public ArrayList<Consumptie> loadgerechten() {
		// TODO Auto-generated method stub
		return null;
	}

}
